/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ccit;

import javax.servlet.AsyncContext;

/**
 *
 * @author think
 */
public class Asynchandler implements Runnable {

    AsyncContext aCtx;

    public Asynchandler(AsyncContext aCtx) {
        this.aCtx = aCtx;
    }

    @Override
    public void run() {

        for (int i = 0; i <= 1000; i++) {
            System.out.println(i);
        }
        String mahasiswa =
                aCtx.getRequest().getParameter("namaMahasiswa");
        aCtx.dispatch("/Result.jsp");
        System.out.println("###########################"+mahasiswa);
        

    }
}
